package com.servicebuck.managers;
import javax.persistence.EntityManager;
import javax.persistence.EntityTransaction;

import com.servicebuck.database.PersistenceUtil;
import com.servicebuck.database.entity.Identity;


public final class RegistrationManager {

	public void registerUser(String emailId, String password){
		Identity idnt = new Identity();
		idnt.setIdentifier("test");
		idnt.setEmail(emailId);
		EntityManager em = new PersistenceUtil().getEntityManagerFactory().createEntityManager();
		EntityTransaction etx=em.getTransaction();
		etx.begin();
		em.persist(idnt);
		etx.commit();
		em.close();
	}
}
